define(['jquery'],function($){
	return {
		join : function(){
			var car_num = document.querySelector('.car_num');
			var tianjia = document.querySelectorAll('.tianjia');
			var diff = document.querySelectorAll('.diff');
			var number = document.querySelectorAll('.number');
			var div = document.querySelector('.goods_info');
			
			for(var j=0; j<tianjia.length;j++){
				var i = 0;
				tianjia[j].onclick = function(){
	            	i++;
	            	car_num.style.display = 'block';
	         	    car_num.innerHTML = i;

	         	    for(var k=0;k<diff.length;k++){
	         	    	diff[k].index = k;
	         	    	number[k].index = k;
	         	    	
	            		diff[k].style.display = 'block';
	            	    number[k].style.display = 'block';
	            	    number[k].innerHTML = i;
	            	    diff[k].onclick = function(){
	            	    	i--;
	            	    	car_num.innerHTML = i;
//	            	    	number[k].innerHTML = i;
	            	    	if(i==0){
	            	    		car_num.style.display = 'none';
	            	    	}
	            	    }
	            	}
	            }
			}
		}
	}
})